﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Re_passwd : System.Web.UI.Page
{
    DataClassesDataContext db = new DataClassesDataContext();
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        string s1;
        int? i=db.re_passwd(db.phone_userName(TextBox1.Text),DropDownList1.SelectedValue,TextBox2.Text,DropDownList2.SelectedValue,TextBox3.Text);
        if (i == 1)
        {
            s1 = TextBox1.Text.Substring(5,6);
            db.revise_Password(db.phone_userName(TextBox1.Text), s1);
            Response.Write("<script>alert('密码重置为手机号后六位！')</script>");
        }
        else Response.Write("<script>alert('密保验证失败！')</script>");
    }
}